package Personnel;

import Operation.*;

import java.util.Scanner;

public class Student extends Personnel {
    private String name;
    private int age;
    private double height;

    private double grade;


    public Student(String name, int age, double height, double grade) {
        super(name);
        this.grade = grade;
        this.age = age;
        this.height = height;
        this.ioperations = new Ioperation[]{
            new ExitOperation(),
            new ShowOneOperation(),
            new FindGradeOperation(),
            new FindRankOperation(),
        };
    }

    public int menu(){
        System.out.println("学生菜单-》");
        System.out.println("================================");
        System.out.println("1.个人信息");
        System.out.println("2.成绩查询");
        System.out.println("3.排名查询");
        System.out.println("0.退出系统");
        System.out.println("================================");
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入的操作-》");
        int choice = scanner.nextInt();
        return choice;
    }

    public String toString() {
        return "Student{" +
                "name='" + super.getName() + '\'' +
                ", age=" + age +
                ", height=" + height +
                ", grade=" + grade +
                '}';
    }

    public double getGrade() {
        return grade;
    }

    public void setGrade(double grade) {
        this.grade = grade;
    }
}
